﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Review
{
    class User
    {
        // 存放用户的账号、用户名和密码属性；
        public string number;
        public string userName;
        public string password;

        public User(string number, string userName, string password)
        {
            this.number = number;
            this.userName = userName;
            this.password = password;
        }

        public void output()
        {
            Console.WriteLine("我的账号是{0}，我的用户名是{1}，我的密码是{2}", this.number, this.userName, this.password);
        }
    }

    class student
    {
        // 定义一个学生类，存放学生的学号、姓名、性别、年龄、专业信息；
        public string stuNo;
        public string name;
        public int age;
        public string professional;

        public student(string stuNo,string name, int age, string professional)
        {
            this.stuNo = stuNo;
            this.name = name;
            this.age = age;
            this.professional = professional;
        if (this.age<=0 || this.age>128){
                this.age = 0;
        }

        }
        public void output2()
        {
            Console.WriteLine("我的学号是{0}，我的名字是{1}，我的年龄是{2}，我的专业信息是{3}"
                ,this.stuNo,this.name,this.age,this.professional);
        }
	
    }

    class book
    {
        //定义一个图书类，存放图书的编号、书名、价格、出版社、作者信息；
        public string bookNo;
        public string bookName;
        public int  money;
        public string press;
        public string author;

        public  book(string bookNo, string bookName, int money,string press,string author)
        {
            this.bookNo = bookNo;
            this.bookName = bookName;
            this.money = money;
            this.press = press;
            this.author = author;
            if (this.money<0)
            {
                this.money = 0;
            }
        }

        public void output3()
        {
            Console.WriteLine("书的编号是{0}，书的名字是{1}，价格是{2}，出版社是{3}，作者信息是{4}"
                ,this.bookNo,this.bookName,this.money,this.press,this.author);
        }
    }




}
